<template>
  <view class="main-header">
    <!-- 搜索 -->
      <view>
        <AtSearchBar class="AtSearchBar"
    :value="value1"
    :onChange="onChange.bind(this, 'value1')"
    :onActionClick="onActionClick"
  />
      </view>
      
  <!-- 轮播图 -->
  <view class="communic-money">
    <swiper
          class='test-h'
          indicatorColor='#999'
          indicatorActiveColor='#333'
          current="0"
          :interval="3000"
          :circular="true"
          :autoplay="true"
          :indicatorDots="true">
          <swiper-item v-for="(item, idx) in banner" :key="idx">
            <image :src="item.pic" :alt="item.name" class="slide-image" />
          </swiper-item>
        </swiper>
  </view>
  </view>
</template>
<script>
import './header.less'

import { AtSearchBar, AtButton } from 'taro-ui-vue'
import { reactive, toRefs } from '@vue/runtime-core'

export default {
  name:'header',
  props:['banner'],
  setup(props,ctx){
    //搜索框事件
    const value1 = '';
    //搜索内容被改变
    const onChange = ()=>{

    }
    //点击按钮
    const onActionClick = ()=>{

    }
    return {
      value1,onChange,onActionClick,
      ...toRefs(props),
    }

  },
    components: {
    AtSearchBar,
    AtButton
  }
}
</script>